HTML5 Data and Services Cookbook by 2013

HTML5 Data and Services Cookbook by 2013

Author:2013
Language: eng
Format: epub
Publisher: Packt Publishing


How it works...

The JSON stringify method accepts three arguments, where the last two are optional. When used with only one argument it will return a JSON string form the JavaScript object, where if some of the properties are undefined inside an object, then it is omitted or censored to null when found in array. If there is a toJSON() function defined inside the object than that function is used to select the object that will get converted. This allows the objects to define their own JSON representation. In our case, the evaluated version of JSON.stringify(customToJSON) will be as follows:

{"custom":"rendering"}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.